package com.course.web.model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;

/**
 * Created by Justin on 2017/6/9.
 */
@Data
@EqualsAndHashCode(of = {"id"})
public class CourseInfoVM implements HasID {
    @Min(0)
    private int id;
    @Min(1)
    private int specId;
    @Min(1)
    private int weeks;
    @NotEmpty
    private String title;
    @NotEmpty
    private String detail;
    @NotNull
    private LocalDate date;
}
